import React from 'react'
import type { PoseDetectionState } from '../features/mediapipe-pose/PoseDetectionService'

interface DetectionStatusMiniProps {
  poseState: PoseDetectionState
}

/**
 * 迷你检测状态组件
 */
export const DetectionStatusMini: React.FC<DetectionStatusMiniProps> = ({ poseState }) => {
  return (
    <div className="detection-status-mini">
      <span className="detection-indicator">
        检测: {poseState.initialized ? '✅ 真实' : poseState.initializing ? '⏳' : '🎭 模拟'}
      </span>
      {poseState.error && (
        <small className="error-hint" title="由于浏览器 CORS 限制，使用模拟检测区域">
          模拟模式 ⓘ
        </small>
      )}
    </div>
  )
}

